package com.ambow.dao.impl;

import com.ambow.dao.UserDao;
import com.ambow.entity.User;
import com.ambow.utils.BaseDAO;
import com.ambow.utils.PageResults;

public class UserDaoImpl implements UserDao{

	@Override
	public User login(String hql, String[] param) {
		return (User) BaseDAO.queryOne(hql, param);
	}

	@Override
	public boolean add(User user) {
		return BaseDAO.add(user);
	}

	@Override
	public User queryById(Class c, int id) {
		return (User) BaseDAO.get(c, id);
	}

	@Override
	public boolean update(User user) {
		return BaseDAO.update(user);
	}

	@Override
	public PageResults<User> getPageByFetchedHql(String hql, String countHql, Integer pageNo, Integer pageSize) {
		return BaseDAO.getPageByFetchedHql(hql, countHql, pageNo, pageSize);
	}

}
